package com.learning.pojo;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class AopBean implements InitializingBean , ApplicationContextAware {
	private ItBean itBean;
	public void setItBean(ItBean itBean) {
		this.itBean = itBean;
	}

	public AopBean(){
		System.out.println("AopBean 构造器...");
	}

	@Override
	public void afterPropertiesSet() throws Exception {
		/**
		 * InitializingBean 接口实现
		 */
		System.out.println("AopBean afterPropertiesSet...");
	}

	public void print() {
		System.out.println("print方法业务逻辑执行");
	}

	@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		System.out.println("setApplicationContext....");
	}
}
